﻿@{
    FollowPeers.Models.FollowPeersDBEntities followPeersDB = new FollowPeers.Models.FollowPeersDBEntities();
    string category = @ViewBag.Category;
}

@Html.Partial("_Header")
@Html.Partial("_SideBar1")
@Html.Partial("_SideBar6(Tags)")

<table>
    <tr>
        <td>
            <div class="grid_9" style="text-align:center">
        <div class="box" style="text-align:center">
            <h2 style="height: 20px; text-align:center; margin-left:70px">Topics for @ViewBag.Category</h2>
            <div style="margin-top:25px; margin-left:60px">
            <table style="margin-top:5px">
            @using (Html.BeginForm())
                    {
                        @Html.ValidationSummary(true)
             
                        <!DOCTYPE html>  
                        <head>
                        <link href="@Url.Content("~/css/bootstrap.min.css")" rel="stylesheet" type="text/css" />
                        <link href="@Url.Content("~/css/bootstrap.css")" rel="stylesheet" type="text/css" />
                        <link href="@Url.Content("~/css/bootstrap-responsive.css")" rel="stylesheet" type="text/css" />
                        <script src="@Url.Content("~/js/jquery-1.8.2.min.js")" type="text/javascript"></script>
                        </head>
            
                        <body>

                        <div class="btn-group btn-group-vertical">
                            @{
                                List<FollowPeers.Models.Specialization> CategoryTopicList = followPeersDB.Specializations.Where(m => m.Field == category).ToList();

                                if (CategoryTopicList != null)
                                {

                                       foreach (var item in CategoryTopicList)
                                       {
                                           <button class="btn"><a href="/Forum/Index/?Category=@item.SpecializationName">@item.SpecializationName</a></button>
                                       }
                                }
                             }
                              
                        </div>

                        <script src="@Url.Content("~/js/bootstrap.min.js")"></script>
                        </body>
                    }
            </table>
            </div>
        </div>
    </div>
        </td>
    </tr>
</table>

@Html.Partial("_Footer")
